/*
 * @Descripttion:
 * @Author: wind-lc
 * @version: 1.0
 * @Date: 2021-06-04 09:44:51
 * @LastEditTime: 2021-06-17 20:39:20
 * @FilePath: \cscec-pms-admin\src\api\legal\branchContract\otherTypesContract.js
 */
import request from '@/utils/request2';
import { contractApiUrl } from '@/api/config.js';


export default {
  /**
   * @description: 获取组织架构
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  findOrg: data => {
    return request({
      url: `${contractApiUrl}/other-contract/findOrg`,
      method: 'get',
      params: data
    })
  },
  /**
   * @description: 其他类合同管理分页查询
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  findListByMain: data => {
    return request({
      url: `${contractApiUrl}/other-contract/findListByMain`,
      method: 'post',
      data
    })
  },
  /**
   * @description: 合同保存草稿
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  createByMain: data => {
    return request({
      url: `${contractApiUrl}/other-contract/createByMain`,
      method: 'post',
      data
    })
  },
  /**
   * @description: 删除合同
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  deleteBymain: data => {
    return request({
      url: `${contractApiUrl}/other-contract/deleteBymain`,
      method: 'post',
      data
    })
  },
  /**
   * @description: 合同详情
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  findListByMainId: data => {
    return request({
      url: `${contractApiUrl}/other-contract/findListByMainId`,
      method: 'get',
      params: data
    })
  },
  /**
   * @description: 编辑用印
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  editSeal: data => {
    return request({
      url: `${contractApiUrl}/other-contract/editSeal`,
      method: 'post',
      data
    })
  },
  /**
   * @description: 基本信息打印
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  otherContractPrint: data => {
    return request({
      url: `${contractApiUrl}/other-contract/otherContractPrint`,
      method: 'get',
      params: data
    })
  },
  /**
   * @description: 获取用印
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  findSealByBaseId: data => {
    return request({
      url: `${contractApiUrl}/other-contract/findSealByBaseId`,
      method: 'get',
      params: data
    })
  },
  /**
   * @description: 审批获取用印
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  findSealByBusinessId: data => {
    return request({
      url: `${contractApiUrl}/other-contract/findSealByBusinessId/${data.sealBusinessId}`,
      method: 'get',
      params: data
    })
  },
  /**
   * @description: 编辑合同基本信息
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  editByMain: data => {
    return request({
      url: `${contractApiUrl}/other-contract/editByMain`,
      method: 'post',
      data
    })
  },

  /**
   * @description: 提交审批
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  generalSubmit: data => {
    return request({
      url: `${contractApiUrl}/other-contract/generalSubmit`,
      method: 'post',
      data
    })
  },
  /**
   * @description: 用印提交
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  sealSubmit: data => {
    return request({
      url: `${contractApiUrl}/other-contract/sealSubmit`,
      method: 'post',
      data
    })
  },
  /**
   * @description: 用印打印
   * @param {*}
   * @return {*}
   */
  sealPrint: data => {
    return request({
      url: `${contractApiUrl}/other-contract/sealPrint`,
      method: 'get',
      params: data
    })
  }


}